import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

import { fileURLToPath, URL } from 'node:url'
export default defineConfig({
  plugins: [vue()],
  build: {
    target: 'es2015', // 兼容更多浏览器
  },
  optimizeDeps: {
    exclude: ['yoga-layout'] // 避免 Vite 预构建它
  },
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    },
  },
})